<extend name="Index::index"/>
<block name="title"><title>修改管理</title></block>
<block name="main">
            <!--右内容区域-->
            <div class="layout-content">

                <div class="page-title">电影管理</div>

                <div class="content-top">
                    <ul class="top-nav">
                        <li class="active"><span>修改信息</span></li>
                    </ul>
                    <div class="clearfix"></div>
                </div>


                <!--content-main start-->
                <div class="container-fluid content-main">
                    <div class="row">
                        <div class="col-md-12">
                            <?php if(isset($_SESSION['message']))
                            {
                                $message=$_SESSION['message'];
                                unset($_SESSION['message']);
                            ?>
                            <div class="ui-tips bg-info">
                                <span class="icon glyphicon glyphicon-info-sign"></span>
                                <span><?php echo $message;?></span>
                            </div>
                            <?php }?>
                        </div>

                            <form action="{:U('updateA',['id'=>$id])}" class="form-horizontal" method="post" enctype="multipart/form-data">

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">电影名称</label>
                                    <div class="col-sm-8">
                                        <input type="text" name="name" class="form-control" value="{$model.name}">
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">封面图片</label>
                                    <div class="col-sm-8">
                                        <img src="__ROOT__{$model['cover']}"/>
                                        <input type="file" name="pic" id="exampleInputFile">
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">简介</label>
                                    <div class="col-sm-8">
                                        <input type="text" name="summary" class="form-control" value="{$model.summary}">
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">描述</label>
                                    <div class="col-sm-8">
                                        <textarea class="form-control" name="description" rows="3">{$model.description}</textarea>
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">评分</label>
                                    <div class="col-sm-8">
                                        <input type="text" name="score" class="form-control" value="{$model.score}">
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">演员列表</label>
                                    <div class="col-sm-8">
                                        <input type="text" name="actore" class="form-control" value="{$model.actore}">
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">上映时间</label>
                                    <div class="col-sm-8">
                                        <input type="date" name="release_at" class="form-control" value="{$model.release_at}">
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">电影时长</label>

                                    <div class="col-sm-8">
                                        <input type="text" name="long" class="form-control" value="{$model.long}">
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">标签</label>
                                    <div class="col-sm-8">
                                        <?php foreach( \Common\Model\Movie::tagAlias() as $key => $value ){ ?>
                                        <label for="ss{$key}"  class="radio-inline">
                                            <input type="checkbox" name="tags[]"value="{$key}" id="ss{$key}"  <?php foreach( $tags as $v ) echo $v == $key ? 'checked': ''?> > {$value}
                                        </label>
                                        <?php } ?>
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">语言</label>

                                    <div class="col-sm-8">
                                        <select name="language" class="form-control">
                                            <?php foreach( \Common\Model\Movie::langAlias() as $key => $value ){ ?>
                                            <option value="{$key}"  <?php echo $model['language'] == $key ? 'selected': ''?>    >{$value}</option>
                                            <?php } ?>
                                        </select>
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">状态</label>

                                    <div class="col-sm-8">
                                        <select name="status" class="form-control">
                                            <?php foreach( \Common\Model\Movie::statusAlias() as $key => $value ){ ?>
                                            <option value="{$key}"  <?php echo $model['status'] == $key ? 'selected': ''?>    >{$value}</option>
                                            <?php } ?>
                                        </select>
                                        <span class="help-block"></span>
                                    </div>

                                </div>
                                <div class="form-group hide">
                                    <div class="col-sm-offset-2 col-sm-8">
                                        <div class="checkbox">
                                            <label>
                                                <input type="checkbox"> Remember me
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-8">
                                        <button type="submit" class="btn btn-default">修改提交</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>

                </div>
            <!--右内容区域结束-->
</block>